package reflect;

/**
 * JDK5之后提供了一个特性，变长参数
 */
public class ArgsDemo {
    public static void main(String[] args) {
        doSome();
        doSome("a","b","c");
        doSome("a","b");
        doSome(1,"a");
        doSome(1,'c',"边长参数");
    }

    public static void doSome(String... args){
        System.out.println(args.length);
    }
    public static void doSome(int a,String... args){
        System.out.println(args.length);
    }
    public static void doSome(int a,char c,String... args){
        System.out.println(args.length);
    }

}

